package com.ruipeng.shengyapo.comm;
import net.sf.json.JSONObject;

public class TestEH {
	public static void main(String[] args) throws Exception {
		EHCache ehCache = new EHCache();
		//测试将json对象存入缓存中
		JSONObject obj = new JSONObject();
		obj.put("name","lsz");
		ehCache.addToCache("cache_json",obj);

		//从缓存中获取
		JSONObject getobj = (JSONObject)ehCache.getCacheElement("cache_json");
		System.out.println(getobj.toString());
	}
}
